package com.py.search.controller.v1;

import com.py.model.common.dtos.ResponseResult;
import com.py.model.search.dtos.UserSearchDto;
import com.py.search.service.ArticleSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/api/v1/article/search")
public class ArticleSearchController {
    @Autowired
    private ArticleSearchService SearchService;


    @PostMapping("/search")
    public ResponseResult search(@RequestBody UserSearchDto dto)  {
        return SearchService.search(dto);
    }
}